

  <title>商品管理</title>
  <div class="layui-card">
    <div class="layui-card-body">
      <div class="layui-tab layui-tab-brief" lay-filter="goods-list-tabs">
        <ul class="layui-tab-title" style="margin-bottom: 10px;">          
        	<li class="layui-this">已上架</li>       
        	<li>无库存</li>
        	<li>已下架</li>
        	<li>聚合回收列表(下架)</li>
        	<li>聚合不回收列表(下架)</li>
        	<li>全部商品</li>      
          <button lay-href="/goods/add-goods/" class="layui-btn" style="position: absolute; right:10px;">添加图书</button>
        </ul>
        <form class="layui-form" action="" lay-filter="goods-list-form" id="goods-list-form">
            <div class="layui-form-item layui-inline">
                <div class="layui-input-inline">
                  <select name="category_pid" lay-verify="category_pid" lay-filter="category_pid" id="category_pid">
                    <option value="">请选择一级分类</option>
                  </select>
                </div>
              </div>
              <div class="layui-form-item layui-inline">
                <div class="layui-input-inline">
                  <select name="first-category-ids" lay-verify="" id="first-category-ids1">
                    <option value="">请选择二级分类</option>
                  </select>
                </div>
              </div>
              <div class="layui-form-item layui-inline">
                  <div class="layui-input-inline">
                    <select name="homepage_recommend_module_id" lay-verify="" id="homepage_recommend_module_id">
                    	<option value="">请选择推荐位</option>
                    </select>
                  </div>
              </div>
              <div class="layui-form-item layui-inline">
                <div class="layui-input-inline">
                  <select name="is_recycle" lay-verify="" id="is_recycle">
                    <option value="">选择是否回收</option>
                    <option value="1">回收</option>
                    <option value="2">不回收</option>
                  </select>
                </div>
              </div>
              <div class="layui-form-item layui-inline">
                <div class="layui-input-inline">
                  <select name="is_recycle" lay-verify="" id="total_stock_sort">
                    <option value="">库存排序</option>
                    <option value="1">从高到低</option>
                    <option value="2">从低到高</option>
                  </select>
                </div>
              </div>
              <div class="layui-form-item layui-inline">
                <div class="layui-input-inline">
                  <select name="is_recycle" lay-verify="" id="sales_total_sort">
                    <option value="">销量排序</option>
                    <option value="1">从高到低</option>
                    <option value="2">从低到高</option>
                  </select>
                </div>
              </div>
              <div class="layui-form-item layui-input-inline">
                <input type="text" name="keyword" id="keyword" placeholder="搜索书名、作者、ISBN" autocomplete="off" class="layui-input">
              </div>
              <div class="layui-form-item layui-inline" style="margin-left:20px;">
                <div class="layui-input-inline">
                  <button class="layui-btn" lay-submit lay-filter="goods-list-search">搜索</button>
                   <button class="layui-btn layui-btn-primary" lay-filter="goods-list-search1">重置</button>
                </div>
              </div>
        </form>
       <div style="padding-bottom: 10px;">
      </div>
        <div class="layui-tab-content">    	
          <div class="layui-tab-item  layui-show" id="status1">		        	
            <table id="LAY-good-list-status1" lay-filter="LAY-good-list-status1"></table>
            <div style="margin-top: 15px;">
	            <button class="layui-btn layuiadmin-btn-useradmin" data-type="batchdel">删除</button>
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="support">设为支持回收</button>
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="noSupport">设为不支持回收</button>
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="allDown">下架</button>   		        	
		        </div>  
          </div>
          <div class="layui-tab-item" id="status2">          	   
              <table id="LAY-good-list-status2" lay-filter="LAY-good-list-status2"></table>
              <div style="margin-top: 15px;">
					        <button class="layui-btn layuiadmin-btn-useradmin" data-type="batchdel1">删除</button>
					        <button class="layui-btn layuiadmin-btn-useradmin" data-type="support1">设为支持回收</button>
					        <button class="layui-btn layuiadmin-btn-useradmin" data-type="noSupport1">设为不支持回收</button>
					        <button class="layui-btn layuiadmin-btn-useradmin" data-type="allDown1">下架</button>
					        <button class="layui-btn layuiadmin-btn-useradmin" data-type="addUp1">上架</button>   
			        </div> 
          </div>
          <div class="layui-tab-item" id="status3">         	
              <table id="LAY-good-list-status3" lay-filter="LAY-good-list-status3"></table>
              <div style="margin-top: 15px;">
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="batchdel2">删除</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="support2">设为支持回收</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="noSupport2">设为不支持回收</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="addUp2">上架</button>     
				    </div>    
          </div>
          <div class="layui-tab-item" id="status5">         	
              <table id="LAY-good-list-status5" lay-filter="LAY-good-list-status5"></table>
              <div style="margin-top: 15px;">
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="batchdel5">删除</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="support5">设为支持回收</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="noSupport5">设为不支持回收</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="addUp5">上架</button>     
				    </div>    
          </div>
          <div class="layui-tab-item" id="status6">         	
              <table id="LAY-good-list-status6" lay-filter="LAY-good-list-status6"></table>
              <div style="margin-top: 15px;">
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="batchdel6">删除</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="support6">设为支持回收</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="noSupport6">设为不支持回收</button>
				        <button class="layui-btn layuiadmin-btn-useradmin" data-type="addUp6">上架</button>     
				    </div>    
          </div>
          <div class="layui-tab-item" id="status4">	
            <table id="LAY-good-list-status4" lay-filter="LAY-good-list-status4"></table>
		        <div style="margin-top: 15px;">
	            <button class="layui-btn layuiadmin-btn-useradmin" data-type="batchdel3">删除</button>
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="support3">设为支持回收</button>
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="noSupport3">设为不支持回收</button>
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="allDown3">下架</button>   	
			        <button class="layui-btn layuiadmin-btn-useradmin" data-type="addUp3">上架</button>   
		        </div>              
          </div>
          <script type="text/html" id="LAY-good-list-table-edit">
            <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">编辑</a>
             <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="comment">评论</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            {{#  if(parseInt(d.state) ==2){ }}					  
						  <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="up">上架</a>
						{{#  } else { }}
						  <a class="layui-btn layui-btn-xs" lay-event="down">下架</a>
						{{#  } }} 
            
          </script>
          <script type="text/html" id="LAY-good-list-table-price">
            <span class="sp1">￥{{d.medium_book_price6}}起</span>
            <a class="sp2" lay-event="tips1">?</a>
            <!--<ul id="tips" class="tips">
            	<li>原价：￥{{d.old_price}}</li>
            	<li>全新：￥{{d.new_book_price}}</li>
            	<li>品相良好：￥{{d.good_book_price}}</li>
            	<li>品相中等：￥{{d.medium_book_price}}</li>
            </ul>-->
          </script>
          <script type="text/html" id="LAY-good-list-table-stock">
            <span class="sp1">{{d.total_stock}}</span>
            <a class="sp2" lay-event="tips2">?</a>
            <!--<ul id="tips" class="tips">
            	<li>全新：{{d.new_book_stock}}</li>
            	<li>品相良好：{{d.good_book_stock}}</li>
            	<li>品相中等：{{d.medium_book_stock}}</li>
            </ul>-->
          </script>
          <script type="text/html" id="LAY-good-list-table-img">
            <img src="{{d.image}}" alt="" style="width:82px; height: 110px;">
          </script>
          <script type="text/html" id="LAY-good-list-modules">
					  <ul>
					  {{#  layui.each(d.homepage_recommend_modules, function(index, item){ }}
					    <li>
					      <span>{{ item.title }}</span>
					    </li>
					  {{#  }); }}
					  {{#  if(d.homepage_recommend_modules.length === 0){ }}
					    
					  {{#  } }} 
					  </ul>          
				  </script>
          <script type="text/html" id="LAY-good-list-recycle">
            <p>{{d.is_recycle ==1?'回收':'不回收'}}</p>
          </script>
        </div>
      </div>
    </div>
  </div>

  
  <script>
    layui.use('goods', layui.factory('goods'))
  </script>
  <style type="text/css">
  	.layui-table-cell, .layui-table-tool-panel li{white-space: inherit !important;}
  	.sp1{float: left;}
  	.sp2{float: left;width: 16px;margin-top: 5px;height: 16px;text-align: center;line-height: 16px;font-size: 14px;color: #ccc;border: 1px solid #ccc;border-radius: 50%;margin-left: 15px;cursor: pointer;}
  </style>